package com.gruppe1.inu.ListAdapters;




import com.gruppe1.inu.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;


public class NotifListAdapter extends ArrayAdapter<String> {
    private  String[] mList;

    public NotifListAdapter(Context context, int textViewResourceId, String[] _mList) {
        super(context, textViewResourceId, _mList);
  this.mList = _mList;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View v = convertView;
  if (v == null) {
            LayoutInflater vi = (LayoutInflater)this.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.notif_list_item, null);
  }
      
  String item = mList[position];
  if (item != null) {
            TextView title = (TextView) v.findViewById(R.id.item);
  
           

      if (title != null) {
                title.setText(item);
      }
     
      
      
  }
  return v;
    }
}